<script language="javascript">
	function view_company_job(comid){
		document.forms[0].action='<?=site_url("front_job_announ/view_job_by_company")?>/'+ comid;
		document.forms[0].submit();
	}
	function job_detail(annouid){
		document.forms[0].action='<?=site_url("front_job_announ/view_job_detail")?>/'+ annouid;
		document.forms[0].submit();
	}
</script>
<div id="border"> 
<form name="" method="post" action="<?=site_url("front_job_announ/search_job_result")?>">  
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
     <tr>
     <td valign="top">       
        <table width="705" border="0" align="center" id="usertitle">
          <tr>
            <td><h3 style="">Jobs Company</h3></td>
            <td align="right">&nbsp;</td>
          </tr>
        </table>
        <div id="content">
        <div style="text-align:right; margin-top:7px; margin-right:5px;">
            	Search: 
                <input type="text" id="txtsearch" name="txtsearch" maxlength="80" /> 
                IN <select id="cbocategory" name="cbocategory">
               <option value="0">All Categories</option>
               <?php foreach($all_cate->result() as $category):?>
               <option value="<?=$category->cate_id;?>"><?=$category->cate_desc;?></option>
               <?php endforeach; ?>
                </select> AND 
                <select id="cbolocation" name="cbolocation">
               <option value="0">All Locations</option>
               <?php foreach($all_location->result() as $location):?>
               <option value="<?=$location->loc_id;?>"><?=$location->loc_desc;?></option>
               <?php endforeach; ?>
                </select>
                <input type="submit" class="kh_button" id="btnsearch" name="btnsearch" value="Search" />
               </div>
        <div class="user_line_border_top">&nbsp;</div>
        <div style="margin:10px auto;"></div>
 				
		    <?php foreach($all_announ->result() as $announ):?>
    <table width="100%" border="0">
        <tr>
          <td width="15%" valign="top" align="center"><a href="<?=site_url("front_job_announ/view_job_detail/$announ->announ_id")?>" >
          <?php if($announ->com_logo<>''){ ?>
          	<img src="<?=site_url("front_job_announ/showcompanylogo/$announ->com_id")?>" width="90" height="60"/>
          <?php }else{?>
          	<img src="<?=base_url();?>images/nopic.gif" width="90" height="60"/>
          <? } ?>
          </a>
          </td>
          <td width="65%" valign="top">
          	<b><a href="<?=site_url("front_job_announ/view_job_detail/$announ->announ_id")?>">
            <?=htmlspecialchars($announ->com_name);?></a></b>
            	<?php
				$alltitle=$this->front_m_job->get_title_by_announid($announ->announ_id);
				$i=0;
				foreach($alltitle->result() as $title):
				?>
                <?=htmlspecialchars($title->title_desc);?>
				<?php $i=$i+1;
				if($i<count($alltitle->result())){?>
                /
                <? } ?>
				<? endforeach;?>
						
            
          </td>
          <td width="15%" valign="top"><b><?=htmlspecialchars(date_postgres_to_html($announ->date_close));?>	</b><br />
          <?php $total_hit_job=$this->front_m_job->get_hit_job($announ->announ_id); ?>
          <font color="#FF0000"><?=count($total_hit_job->result());?></font> Hit(s)</td>
        </tr>
  	</table>
    <? endforeach;?>
    </div>

	<div id="pagesize" align="center"><?php echo $this->pagination->create_links(); ?></div>
    
        </td>
        <td width="254" valign="top">
			<?php include APPPATH."views/templates/common/right_content.php"; ?>
         </td>
         
      </tr>
  </table>
  </form>
</div>